{% extends "space/base.html" %}

{% block menu_list %}
        <li>+<a href="/space/customer/">我的主页</a></li>
        <li>+<a href="/space/customer/profile/">我的资料</a></li>
        <li>+<a href="/space/customer/orders/">订餐记录</a></li>
        <li>+<a href="/space/customer/msg/">消息管理</a></li>   

           <!-- {% ifequal user.groups.all.0.name 'customer'  %} 
           <li>+<a href="/space/rest/apply/">修改申请</a></li>
           {%endifequal%} -->        
        {% if not perms.pub.rest %}
        <li>+<a href="/space/customer/rest/apply/">申请成为餐厅会员</a></li>
        {% endif %}
{% endblock %}
{% block right_container %}
<div class="admin_position">个人中心 > 订单列表</div>
    <table class="admin_index_table"><tbody>
      <tr>
        <td colspan="5" class="admin_consumption">未消费<span class="red2">{{order_falses.count}}</span>笔<a href="">查看全部</a></td>
      </tr>
      <tr class="admin_title">
        <td>餐厅</td>
        <td>消费金额</td>
        <td>下订时间</td>
        <td>订单号</td>
        <td>操作</td>
      </tr>
      {% for order_false in order_falses%}
	      <tr>
	        <td>{{order_false.rest}}</td>
	        <td>{{order_false.total}}元</td>
	        <td>{{order_false.reg_time|date:"Y-m-d H:m:s"}}</td>
	        <td>{{order_false.sn}}</td>
	        <td><a href="">查看订单</a></td>
	      </tr>
      {% endfor %}
      <tr>
        <td colspan="5" class="admin_consumption">已消费<span class="red2">{{order_trues.count}}</span>笔<a href="">查看全部</a></td>
      </tr>
      <tr class="admin_title">
        <td>餐厅</td>
        <td>消费金额</td>
        <td>消费时间</td>
        <td>订单号</td>
        <td>操作</td>
      </tr>
      {% for order_true in order_trues%}
	      <tr>
	        <td>{{order_true.rest}}</td>
	        <td>{{order_true.total}}元</td>
	        <td>{{order_true.real_ct|date:"Y-m-d H:m:s"}}</td>
	        <td>{{order_true.sn}}</td>
	        <td><a href="">查看订单</a></td>
	      </tr>
      {% endfor %}
      <tr>
        <td colspan="5" class="admin_consumption">我消费过的餐厅<span class="red2">{{consume_rests.count}}</span>间 <a href="">查看全部</a></td>
      </tr>
      <tr>
        <td colspan="5" class="admin_con_res">
          <ul>
          	{% for consume_rest in consume_rests%}
            	<li><a href=""><img src="/image/{{consume_rest.rest.img}}"><br>{{consume_rest.rest}}</a></li>
          	{% endfor %}
          </ul>          
        </td>
      </tr>
    </tbody></table>
 {% endblock %}
